package top.yifengxiner.framework.shiro.service;

import org.apache.shiro.crypto.hash.Md5Hash;
import org.springframework.stereotype.Component;

/**
 * @author ：baixiao
 * @date ：Created in 2021/5/6 11:11
 * @description：系统密码服务
 * @modified By：
 * @version: 0.0.1$
 */
@Component
public class SysPasswordService
{
    /**
     * md5加密
     * @param username
     * @param password
     * @param salt
     * @return
     */
    public String encryptPassword(String username,String password,String salt)
    {
        return new Md5Hash(username+password+salt).toHex();
    }
}
